# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Analytics.V3.Model.UserDeletionRequest do
  @moduledoc """
  JSON template for a user deletion request resource.

  ## Attributes

  *   `deletionRequestTime` (*type:* `DateTime.t`, *default:* `nil`) - This marks the point in time for which all user data before should be deleted
  *   `firebaseProjectId` (*type:* `String.t`, *default:* `nil`) - Firebase Project Id
  *   `id` (*type:* `GoogleApi.Analytics.V3.Model.UserDeletionRequestId.t`, *default:* `nil`) - User ID.
  *   `kind` (*type:* `String.t`, *default:* `analytics#userDeletionRequest`) - Value is "analytics#userDeletionRequest".
  *   `propertyId` (*type:* `String.t`, *default:* `nil`) - Property ID
  *   `webPropertyId` (*type:* `String.t`, *default:* `nil`) - Web property ID of the form UA-XXXXX-YY.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :deletionRequestTime => DateTime.t() | nil,
          :firebaseProjectId => String.t() | nil,
          :id => GoogleApi.Analytics.V3.Model.UserDeletionRequestId.t() | nil,
          :kind => String.t() | nil,
          :propertyId => String.t() | nil,
          :webPropertyId => String.t() | nil
        }

  field(:deletionRequestTime, as: DateTime)
  field(:firebaseProjectId)
  field(:id, as: GoogleApi.Analytics.V3.Model.UserDeletionRequestId)
  field(:kind)
  field(:propertyId)
  field(:webPropertyId)
end

defimpl Poison.Decoder, for: GoogleApi.Analytics.V3.Model.UserDeletionRequest do
  def decode(value, options) do
    GoogleApi.Analytics.V3.Model.UserDeletionRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Analytics.V3.Model.UserDeletionRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
